Setting Facilities Per Row in a Group Grid Control
Rows in a Group Grid control can be assigned different facilities programmatically.
The following example demonstrates how to do this.
To Set Facilities Per Row in a Group Grid Control
- Create a new Studio screen.
- Add a Group Grid control to the screen. In the (ObjectCode) field, type "gridControl."
- Set up ActiveX Properties for the Group Grid control.
- On the ActiveX page, set AutoStart to No. This allows the initialization script (below) to be executed first.
- Click the (OCXProperties) field. On the Default page, select a Site/Service and UDC to display. On the Columns page, add one or more columns as desired.
- Add script to initialize the Group Grid control.
- Open the Script Editor and navigate to gridControl EventInitialize event.
- Enter the following script to add rows to the grid, where each row represents a facility that contains the UDC previously provided. Replace the facility names with those in your system.
Copy
Add rows representing facilities
Sub gridControl_EventInitialize()
Dim This : Set This = gridControl
This.X.RowFacility(1) = "MyFacility1"
This.X.RowFacility(2) = "MyFacility2"
This.X.RowFacility(0) = "MyFacility3"
This.X.RowLabelText(1) = "My Facility 1"
This.X.RowLabelText(2) = "My Facility 2"
This.X.RowLabelText(0) = "My Facility 3"
This.X.Start
End Sub
- Save the screen and switch to Run mode. The grid automatically displays rows for each facility.

